//
//  DYUtility.h
//  DaYing
//
//  Created by DaYing  on 2023.
//  Copyright © 2023 DaYing . All rights reserved.
//

#import <UIKit/UIKit.h>

@interface DYUtility : NSObject

#pragma mark - 时间格式化

+ (NSString *)stringFromDateTimeToMinutes:(int64_t)time formart:(NSString *)formart;

#pragma mark - 播放时间格式化

+ (NSString *)getStringFromTime:(float)currentTimeValue;

#pragma mark 数据处理

 //正则去除标签
+ (NSString *)removeHtmlWithString:(NSString *)htmlString;

#pragma mark 样式

// 设置文字中关键字高亮
+ (NSMutableAttributedString *)searchTitle:(NSString *)title key:(NSString *)key keyColor:(UIColor *)keyColor;

//传2个字符串以及样式 返回一个NSMutableAttributedString
+ (NSMutableAttributedString *)getNewColorStr:(NSString *)headStr headFont:(UIFont *)headFont headColor:(UIColor *)headColor lastStr:(NSString *)lastStr lastFont:(UIFont *)lastFont lastColor:(UIColor *)lastColor;

//传3个字符串以及样式 返回一个NSMutableAttributedString
+ (NSMutableAttributedString *)getNewColorStr:(NSString *)headStr headFont:(UIFont *)headFont headColor:(UIColor *)headColor middleStr:(NSString *)middleStr middleFont:(UIFont *)middleFont middleColor:(UIColor *)middleColor footStr:(NSString *)footStr footFont:(UIFont *)footFont footColor:(UIColor *)footColor;

+ (NSMutableAttributedString *)getNewColorWithAry:(NSArray *)ary;

//数字字符串校验
+ (BOOL)numVerification:(NSString *)num;

+ (NSString*)dictionaryToJson:(NSDictionary *)dic;

@end
